import React, { Component } from 'react';
import { StyleSheet, SafeAreaView,Text,View } from 'react-native';
import { SearchBar } from 'react-native-elements';
import Styles from '../styles/Home';

export default class Home extends Component {
  goSearchPage = (value) =>{
    console.log(value);
    // console.log(this.props.navigation);
    this.props.navigation.navigate('Search',{
      keywords: value
    });
  }
  
  render() {
    console.log('home')

    return (
      <SafeAreaView style={styles.container}>
        <SearchBar
        onChangeText={this.goSearchPage}
        placeholder='请输入币种名' />
        <View style={Styles.container}>
        <Text> home
        </Text>
        </View>
      </SafeAreaView>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    // flex: 1,
    // backgroundColor: 'black'
  }
});
